using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsBufferUrl : GeneratedMessageLite<SnsBufferUrl, SnsBufferUrl.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsBufferUrl, SnsBufferUrl.Builder>
		{
			private bool resultIsReadOnly;
			private SnsBufferUrl result;
			protected override SnsBufferUrl.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsBufferUrl MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsBufferUrl DefaultInstanceForType
			{
				get
				{
					return SnsBufferUrl.DefaultInstance;
				}
			}
			public string Url
			{
				get
				{
					return this.result.Url;
				}
				set
				{
					this.SetUrl(value);
				}
			}
			public uint Type
			{
				get
				{
					return this.result.Type;
				}
				set
				{
					this.SetType(value);
				}
			}
			public Builder()
			{
				this.result = SnsBufferUrl.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsBufferUrl cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsBufferUrl PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsBufferUrl other = this.result;
					this.result = new SnsBufferUrl();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsBufferUrl.Builder Clear()
			{
				this.result = SnsBufferUrl.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsBufferUrl.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsBufferUrl.Builder(this.result);
				}
				return new SnsBufferUrl.Builder().MergeFrom(this.result);
			}
			public override SnsBufferUrl BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsBufferUrl.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsBufferUrl)
				{
					return this.MergeFrom((SnsBufferUrl)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsBufferUrl.Builder MergeFrom(SnsBufferUrl other)
			{
				return this;
			}
			public override SnsBufferUrl.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsBufferUrl.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsBufferUrl._snsBufferUrlFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsBufferUrl._snsBufferUrlFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasType = input.ReadUInt32(ref this.result.type_);
						}
					}
					else
					{
						this.result.hasUrl = input.ReadString(ref this.result.url_);
					}
				}
				return this;
			}
			public SnsBufferUrl.Builder SetUrl(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUrl = true;
				this.result.url_ = value;
				return this;
			}
			public SnsBufferUrl.Builder ClearUrl()
			{
				this.PrepareBuilder();
				this.result.hasUrl = false;
				this.result.url_ = "";
				return this;
			}
			public SnsBufferUrl.Builder SetType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasType = true;
				this.result.type_ = value;
				return this;
			}
			public SnsBufferUrl.Builder ClearType()
			{
				this.PrepareBuilder();
				this.result.hasType = false;
				this.result.type_ = 0u;
				return this;
			}
		}
		public const int UrlFieldNumber = 1;
		public const int TypeFieldNumber = 2;
		private static readonly SnsBufferUrl defaultInstance;
		private static readonly string[] _snsBufferUrlFieldNames;
		private static readonly uint[] _snsBufferUrlFieldTags;
		private bool hasUrl;
		private string url_ = "";
		private bool hasType;
		private uint type_;
		private int memoizedSerializedSize = -1;
		public static SnsBufferUrl DefaultInstance
		{
			get
			{
				return SnsBufferUrl.defaultInstance;
			}
		}
		public override SnsBufferUrl DefaultInstanceForType
		{
			get
			{
				return SnsBufferUrl.DefaultInstance;
			}
		}
		protected override SnsBufferUrl ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string Url
		{
			get
			{
				return this.url_;
			}
		}
		public uint Type
		{
			get
			{
				return this.type_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasType;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUrl)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.Url);
				}
				if (this.hasType)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Type);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsBufferUrl()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsBufferUrlFieldNames = SnsBufferUrl._snsBufferUrlFieldNames;
			if (this.hasUrl)
			{
				output.WriteString(1, snsBufferUrlFieldNames[1], this.Url);
			}
			if (this.hasType)
			{
				output.WriteUInt32(2, snsBufferUrlFieldNames[0], this.Type);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUrl)
			{
				num ^= this.url_.GetHashCode();
			}
			if (this.hasType)
			{
				num ^= this.type_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsBufferUrl snsBufferUrl = value as SnsBufferUrl;
			return snsBufferUrl != null && (this.hasUrl == snsBufferUrl.hasUrl && (!this.hasUrl || this.url_.Equals(snsBufferUrl.url_))) && (this.hasType == snsBufferUrl.hasType && (!this.hasType || this.type_.Equals(snsBufferUrl.type_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsBufferUrl, SnsBufferUrl.Builder>.PrintField("Url", this.hasUrl, this.url_, writer);
			GeneratedMessageLite<SnsBufferUrl, SnsBufferUrl.Builder>.PrintField("Type", this.hasType, this.type_, writer);
		}
		public static SnsBufferUrl ParseFrom(byte[] data)
		{
			return SnsBufferUrl.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsBufferUrl MakeReadOnly()
		{
			return this;
		}
		public static SnsBufferUrl.Builder CreateBuilder()
		{
			return new SnsBufferUrl.Builder();
		}
		public override SnsBufferUrl.Builder ToBuilder()
		{
			return SnsBufferUrl.CreateBuilder(this);
		}
		public override SnsBufferUrl.Builder CreateBuilderForType()
		{
			return new SnsBufferUrl.Builder();
		}
		public static SnsBufferUrl.Builder CreateBuilder(SnsBufferUrl prototype)
		{
			return new SnsBufferUrl.Builder(prototype);
		}
		static SnsBufferUrl()
		{
			SnsBufferUrl.defaultInstance = new SnsBufferUrl().MakeReadOnly();
			SnsBufferUrl._snsBufferUrlFieldNames = new string[]
			{
				"Type",
				"Url"
			};
			SnsBufferUrl._snsBufferUrlFieldTags = new uint[]
			{
				16u,
				10u
			};
			object.ReferenceEquals(micromsg.Proto.SnsBufferUrl.Descriptor, null);
		}
	}
}
